﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AcctrueWMS.Foundation.WebControls
{
    public class AccCheckBox : AccControl
    {
        public override string Render()
        {
            StringBuilder sb = new StringBuilder();
            #region 生成控件
            sb.Append("<nobr>");
            sb.Append("<input type='checkbox' ");
            sb.Append(" ctitle='" + base.Title + "' ");
            sb.Append(GenerateBasicProperty());
            string controlValue = GetControlValue();
            if (controlValue.Trim().Length != 0)
                if (Convert.ToBoolean(controlValue))
                {
                    sb.Append(" checked='checked'");
                }
            sb.Append(" >");
            sb.Append(this.Description);
            sb.Append("</input>");
            if (this.Musted)
            {
                sb.Append("<font style='color:red'>*</font>");
            }
            sb.Append("</nobr>");
            #endregion

            #region 生成脚本
            #endregion
            return sb.ToString();
        }
    }
}
